﻿CREATE PROCEDURE [acms].[Post_GetAllByMenuIdAndParentId]
	@MenuId int, 
	@ParentId int
AS
	SELECT *
	FROM [Post_View]
	Where ParentId = @ParentId
		and Id in (Select PostId from [PostMenu] where MenuId = @MenuId and Included = 1)
	ORDER By Sequence
RETURN 0;